	<h1>Leave Information</h1>
	<%= render :partial => 'breadcrumbs' %>
	<div class="extralinks">
	<%@leave_types.each do |leave_type|%>
  <%=link_to leave_type.title, :action => 'show_leave_info',:id => leave_type.id%> | 
  <%end%> </div>
<img src="/images/cal_info2.png" />
<table class="tb_listing">
	<thead>
	<tr class="month">
		<td colspan="2"><h3>Leave List</h3></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td width="12%">&nbsp;</td>
		<td width="1%">&nbsp;</td>
	</tr>
	<tr>
		<th width="10%">Date</th>
		<th width="13%">Employee Name</th>
		<th width="13%">Employee Id </th>
		<th width="15%">Start Date </th>
		<th width="18%">End Date </th>
		<th width="18%">Type of Leave</th>
		<th>Remarks</th>
		<th>&nbsp;</th>
	</tr>
	</thead>
	<%@leave_details.each do |leave_detail|%>
	<tr class="<%= cycle "odd","even" %>">
	
		<td width="10%"><%=leave_detail.date%></td>
		<td width="13%"><%=leave_detail.leave.employee.name%></td>
		<td><%=leave_detail.leave.employee.employee_number%></td>
		<td><%=leave_detail.leave.start_date.strftime("%d %B %Y")%></td>
		<td><%=leave_detail.leave.end_date.strftime("%d %B %Y")%></td>
		<td><%=leave_detail.leave.leave_type.title%></td>
		<td><%=leave_detail.leave.remarks%></td>
		<td class="mdl">&nbsp;</td>
	</tr>
	<%end%>
	<tr class="even">
	
		<td width="10%"></td>
		<td width="13%"></td>
		<td></td>
		<td>Total Leave Taken </td>
		<td><%=@usertotalleave%> day(s)</td>
		<td>Leave Available </td>
		<td><%=@totalleave.to_i-@usertotalleave.to_i%> days</td>
		<td>&nbsp;</td>
	</tr>
	
</table>

<div class="pagination"> <%= will_paginate @leave_details%></div> 

<%@leave_types.each do |leave_type|%> <%if @employee.gender_id == 1%><%next if leave_type.id == 5%><%elsif @employee.gender_id == 2%><%next if leave_type.id == 6%><%end%><%=leave_type.title %> ( <%=leave_type.total%> days ) <%end%>
	